﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Values;

namespace DHJ.Cost.Timing
{
    public class OccurrenceTime : ValueObject<OccurrenceTime>
    {
        private OccurrenceTime()
        {
        }

        public OccurrenceTime(int year, int month)
        {
            Year = year;
            Month = month;
        }

        [Column(nameof(Year))]
        [Range(1900, 2099)]
        public int Year { get; set; }

        [Column(nameof(Month))]
        [Range(1, 12)]
        public int Month { get; set; }
    }
}